Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(android): getter/setter for applicationLocales in Android 12 and up #14013

Closed
wants to merge 12 commits into from

Conversation

AbdullahFaqeir
Copy link
Contributor

@AbdullahFaqeir AbdullahFaqeir commented Mar 23, 2024

Description:

This PR was raised from an issue appeared on android level 33 and later which caused Ti.Locale.setLanguage() not to work properly, which caused random pages not to be translated unless you recall Ti.Locale.setLanguage() on each page.

See here

Replacing PR #14008

edited by Michael: for a test code check #14008 (comment)

@m1ga m1ga self-requested a review March 23, 2024 20:35
Copy link
Contributor

@m1ga m1ga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you revert the changes to the comments in the LocaleModule, please. And the text.startsWith... change. Don't think that is needed for the applicationLocale.

Please keep the indent level in the doc file.

fix(android): revert code refactor in LocaleModule file
fix(android): fix indication the Locale.yml file.
@AbdullahFaqeir
Copy link
Contributor Author

AbdullahFaqeir commented Sep 13, 2024

Can you revert the changes to the comments in the LocaleModule, please. And the text.startsWith... change. Don't think that is needed for the applicationLocale.

Please keep the indent level in the doc file.
@m1ga
Should I go back to this?

@AbdullahFaqeir
Copy link
Contributor Author

@m1ga @AbdullahFaqeir can we check on this?

@m1ga
Copy link
Contributor

m1ga commented Sep 16, 2024

Documentation:
Can you change the indent level of the readme file back to the old amount of spaces so it will be inline with the other files and doesn't have that many changes.
And it would be good to say it is reading/setting the "Per-app language" instead of "UI language". Google calls it: https://developer.android.com/guide/topics/resources/app-languages
Also add "returns an empty array if no per-app language is set yet". So people won't get confused why it is not returning anything (e.g. a default lang).

@AbdullahFaqeir
Copy link
Contributor Author

Documentation: Can you change the indent level of the readme file back to the old amount of spaces so it will be inline with the other files and doesn't have that many changes. And it would be good to say it is reading/setting the "Per-app language" instead of "UI language". Google calls it: https://developer.android.com/guide/topics/resources/app-languages Also add "returns an empty array if no per-app language is set yet". So people won't get confused why it is not returning anything (e.g. a default lang).

@m1ga of course, I'll do it ASAP

fix(android): implemented the Per-app languages properly.
fix(android): fixed docs.
fix(android): bumped AppCompact version to 1.6.1
@AbdullahFaqeir
Copy link
Contributor Author

@m1ga @hansemannn I believe this one is ready/

@hansemannn
Copy link
Collaborator

There seem to be many changes which are not related to this PR, e.g. docs indentation and iOS xcode settings. Please split these up into separate PR's, so this one remains slim. Thank you!

@m1ga
Copy link
Contributor

m1ga commented Sep 17, 2024

And please add the API 33 check again https://developer.android.com/reference/android/app/LocaleManager#setApplicationLocales(android.os.LocaleList) was "Added in API level 33" and Ti still supports lower SDKs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants